﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataCollectService
{
    /// <summary>
    /// 采集配置
    /// </summary>
    public class DeviceConfig
    {
        public int DeviceID { get; set; }
        public string DeviceNo { get; set; }
        public string ProtocalConfig { get; set; }
        public string DataBaseConfig { get; set; }
        public string SaveDataTime { get; set; }
        public string RunRangeTime { get; set; }
        public List<DeviceVarConfig> VarList { get; set; }
        public List<DeviceJSONConfig> VarJSONList { get; set; }
        public List<CollectWebAPIConfig> CollectWebAPIList { get; set; }
        public bool IsRunning { get; set; }
        //0停机、1、运行、2、待机、3、报警
        public int RunStatus { get; set; }
        public int StopTime { get; set; }
        public int RunTime { get; set; }
        public int WaitTime { get; set; }
        public int WarningTime { get; set; }
        public string OEE { get; set; }
        //最后一次获取采集数据
        public DateTime LastCJTime { get; set; }

    }

    public class DeviceVarConfig
    {
        public string VarName { get; set; }
        public string VarPath { get; set; }
        public string VarSpecial { get; set; }
        public string VarType { get; set; }
        public int VarRequency { get; set; }
    }

    public class DeviceJSONConfig
    {
        public string EquipJSONConfigID { get; set; }
        public string ParentID { get; set; }
        public string NodeName { get; set; }
        public string NodeType { get; set; }
    }

    public class CollectWebAPIConfig
    {
        public int EquipWebAPIConfigID { get; set; }
        public int EquipID { get; set; }
        public string ParamUrl { get; set; }
        public bool webAPIChecked { get; set; }

        public List<CollectWebAPIDetailConfig> listDetailConfig { get; set; }
    }

    public class CollectWebAPIDetailConfig
    {
        public string EquipWebAPIConfigDeID { get; set; }
        public int EquipWebAPIConfigID { get; set; }
        public string ParentID { get; set; }
        public string NodeName { get; set; }
        public string NodeType { get; set; }
    }

}
